package Objects;

public class Member implements CRUDClass {

  private String address, name, join_year, country, pdaID;
  private int userID, working_region;

  public Member(String address, String name, String join_year, String country, String pdaID, int userID, int working_region) {
    this.address = address;
    this.name = name;
    this.join_year = join_year;
    this.country = country;
    this.pdaID = pdaID;
    this.userID = userID;
    this.working_region = working_region;
  }

  public String getAddress() {
    return address;
  }

  public void setAddress(String address) {
    this.address = address;
  }

  public String getCountry() {
    return country;
  }

  public void setCountry(String country) {
    this.country = country;
  }

  public String getJoin_year() {
    return join_year;
  }

  public void setJoin_year(String join_year) {
    this.join_year = join_year;
  }

  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public String getPdaID() {
    return pdaID;
  }

  public void setPdaID(String pdaID) {
    this.pdaID = pdaID;
  }

  public int getUserID() {
    return userID;
  }

  public void setUserID(int userID) {
    this.userID = userID;
  }

  public int getWorking_region() {
    return working_region;
  }

  public void setWorking_region(int working_region) {
    this.working_region = working_region;
  }

  @Override
  public String toInsert() {
    return "INSERT INTO Member VALUES ('" + this.userID + "', '" + this.country + "', '" + this.name + "', '"
            + this.address + "', '" + this.join_year + "', '" + this.pdaID + "', " + this.working_region + ");";
  }

  @Override
  public String toUpdate() {
    return "UPDATE Member SET Country = '" + this.country + "', Name = '"
            + this.name + "', Actual_Addr = '" + this.address + "', Joined_Year = '" + this.join_year + "', PdaID = '"
            + this.pdaID + "', Working_Region_ID = " + this.working_region + " WHERE UserID = " + this.userID;
  }

  @Override
  public String toDelete() {
    return "DELETE FROM Member WHERE UserID = " + this.userID;
  }
}